#ifndef IDT_H_
	#define IDT_H_
	
	#define IDT_TABLE_SIZE 256
	
	#define IDT_SEG 0x08
	
	#define IDT_FLAGS 0x8E
	
	#define IDT_FLAGS_R 0x8D
	
	/*Struct for IDT.*/
	struct _idt_entry_table_struct
	{
	   unsigned short l_offset; /*The lower 16 bits of offset.*/
	   unsigned short seg_sel; /* Kernel segment selector.*/
	   unsigned char unused; /*Not used bits.*/
	   unsigned char flags; /*Flags.*/
	   unsigned short h_offset; /*The upper 16 bits of offset.*/
	} __attribute__((packed));

	/**
	 * idtr_t
	 *
	 * IDTR store IDT table size (limit) and the pointer to the table
	 */
	struct _idt_idtr {
		unsigned short table_limit;
		unsigned int idt_ptr;
	} __attribute__ ((packed)) IDTR;
	
	typedef struct _idt_entry_table_struct idt_entry_t;

	void init_IDT(void);

	inline void load_idt(void);

#endif /* IDT_H_ */
